/*
 * Project 1 phase 1
 * Efim Todorasco and Liviu Patrasco  
 */
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;

public class Rectangle extends SceneGraphNode {
	
	public Rectangle() {
		this(true);
	}
	
	public Rectangle(boolean pickable) {
		super(pickable);
	}
	
	public void renderGeometry(GLAutoDrawable drawable) {
		GL2 gl = drawable.getGL().getGL2();
		 gl.glBegin(GL.GL_TRIANGLE_STRIP); 
			gl.glColor3f(.8f, .8f, .8f);
         gl.glVertex2f(-0.5f, 0.5f); 
			gl.glColor3f(.8f, .8f, .8f);

         gl.glVertex2f(0.5f, 0.5f); 
			gl.glColor3f(.8f, .8f, .8f);

         gl.glVertex2f(-0.5f, -0.5f);
			gl.glColor3f(.8f, .8f, .8f);

         gl.glVertex2f(0.5f, -0.5f);
         gl.glEnd();
	}
}
